﻿using System;

namespace FNN.CustomFunctions
{
    [Serializable]
    public class SimpleFractional : IFunction
    {
        /// <summary>
        ///     Функция y = 2*x/(x^2+1)
        /// </summary>
        /// <param name="param">Аргумент функции</param>
        /// <returns>Значение функции</returns>
        public double Calculate(double param)
        {
            return Math.Pow(2 * param / (Math.Pow(param, 2) + 1), 2);
        }
    }
}